package com.heima.reggie.controller;


import com.heima.reggie.common.R;
import com.heima.reggie.pojo.Orders;
import com.heima.reggie.service.OrdersService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("/order")
public class OrderController {
@Autowired
    private OrdersService ordersService;
    @PostMapping("/submit")
    public R submit(@RequestBody  Orders orders){
        log.info("数据内容---------------------------------------------------->{}",orders);
        ordersService.submit2(orders);

        return R.success("chengg");
    }

}
